import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// import

Vue.config.productionTip = false

// 找 filter/filter.js
import * as filters from './filter/filter.js'
//遍历所有导出的过滤器并添加到全局过滤器
Object.keys(filters).forEach((key) => {
  // console.log('in main.js');
  // console.log(key, filters[key]); // 第二个是一个函数
  Vue.filter(key, filters[key]); // 对vue的filter注册filters[key]
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
